<html>
<head><meta charset="utf-8"><title>Special completion handling for &quot;use&quot;. · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Special.20completion.20handling.20for.20.22use.22.2E.html">Special completion handling for &quot;use&quot;.</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="183466087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Special%20completion%20handling%20for%20%22use%22./near/183466087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Special.20completion.20handling.20for.20.22use.22.2E.html#183466087">(Dec 15 2019 at 01:05)</a>:</h4>
<p>Hello, currently rust-analyzer and rls doesn't do the right thing with the autocomplete within <code>use</code>. When i try to write <code>use xxx::macro_foo;</code> auto complete will add extra <code>!</code> and parenthesis, which is not at all what i want. I wonder if it's possible to do some "context analysis" and provide different completions in this case.</p>



<a name="183479661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Special%20completion%20handling%20for%20%22use%22./near/183479661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Special.20completion.20handling.20for.20.22use.22.2E.html#183479661">(Dec 15 2019 at 08:55)</a>:</h4>
<p>Huh? We do exactly that</p>



<a name="183479668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Special%20completion%20handling%20for%20%22use%22./near/183479668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Special.20completion.20handling.20for.20.22use.22.2E.html#183479668">(Dec 15 2019 at 08:55)</a>:</h4>
<p><a href="/user_uploads/4715/MprnRZqheOqYhn_ZFRVGzCJR/macro.gif" target="_blank" title="macro.gif">macro.gif</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/MprnRZqheOqYhn_ZFRVGzCJR/macro.gif" target="_blank" title="macro.gif"><img src="/user_uploads/4715/MprnRZqheOqYhn_ZFRVGzCJR/macro.gif"></a></div>



<a name="183573101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Special%20completion%20handling%20for%20%22use%22./near/183573101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Special.20completion.20handling.20for.20.22use.22.2E.html#183573101">(Dec 16 2019 at 17:49)</a>:</h4>
<p>Oh really! Maybe my build is a bit outdated. Let me build the newest commit and try again.</p>



<a name="183575160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Special%20completion%20handling%20for%20%22use%22./near/183575160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Special.20completion.20handling.20for.20.22use.22.2E.html#183575160">(Dec 16 2019 at 18:16)</a>:</h4>
<p>Yes! the newer version works just as expected, thank you!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>